import React from 'react';
import { Layout } from 'antd';
import { Menu } from 'antd';
import { useHistory } from 'react-router-dom';
import RoutesViews from '../../router/RoutesViews';

const { Sider, Content } = Layout;
const { SubMenu } = Menu;
function getItem(label, key, icon, children) {
    return {
        key,
        icon,
        children,
        label,
    };
}

function CustomerManage(props) {
    var { routes } = props;
    var history = useHistory()


    var handleClick = ({ item, key, keyPath, domEvent }) => {
        history.push(key)
    }
    return (
        <div className='employee'>
            <Layout>
                <Sider>
                    <Menu
                    mode="inline"
                    theme="light"
                        onClick={handleClick}
                        defaultSelectedKeys={['/index/SystemManage/RealtimeData']}
                    >
                         <Menu.Item key="1">在线系统</Menu.Item>
                         <Menu.Item key="/index/SystemManage/RealtimeData">实时数据</Menu.Item>

                         <SubMenu
                            key="10"
                            title={
                                <span>
                                    {/* <SettingOutlined></SettingOutlined> */}
                                    <span>历史数据</span>
                                </span>
                            }
                        >
                        <Menu.Item key="/index/SystemManage/HistoricalData">总览</Menu.Item>
                        <Menu.Item key="2">坐席报表</Menu.Item>
                        <Menu.Item key="3">留言报表</Menu.Item>
                    </SubMenu>
                    </Menu>
                </Sider>
                <Content style={{padding:'20px'}}>
                    {/* 三级路由渲染规则 */}
                    {/* <RoutesViews routes={routes}></RoutesViews> */}
                </Content>
            </Layout>

        </div>
    );
}

export default CustomerManage;